#ifndef RPC_SERVER_H
#define RPC_SERVER_H

#include "SingleClass.h"
#include <grpc++/grpc++.h>
#include "../include/statusServe_rpc.h"
class rpc_server:public SingleClass<rpc_server>{

public:
    void start();
    //停止rpc服务的调用
    void stop();    
    ~rpc_server();
private:
    friend class SingleClass<rpc_server>;
    grpc::ServerBuilder build;
    std::unique_ptr<grpc::Server> server;

    rpc_server();
    void register_service();
    //用于注册的服务
    statusServe_rpc *status_service;


};


#endif